package com.dwx.gmall.product.controller;

import com.dwx.gmall.common.result.Result;
import com.dwx.gmall.model.product.SpuSaleAttr;
import com.dwx.gmall.product.service.SpuSaleAttrService;
import com.dwx.gmall.product.service.SpuSaleAttrValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/admin/product")
public class SpuSaleAttrController {
    @Autowired
    SpuSaleAttrService spuSaleAttrService;

    @GetMapping("/spuSaleAttrList/{spuId}")
    public Result<List<SpuSaleAttr>> spuSaleAttrList(@PathVariable("spuId") Long spuId){
        List<SpuSaleAttr> list=spuSaleAttrService.spuSaleAttrList(spuId);
        return Result.ok(list);
    }
}
